package Demo2;

import java.util.Comparator;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/1/17
 * Time:17:14
 **/
public class ScoreComparator implements Comparator<Student2> {

    @Override
    public int compare(Student2 o1, Student2 o2) {
        if(o1.score>o2.score){
            return 1;
        }else if(o1.score>o2.score){
            return 0;
        }else {
            return -1;
        }
    }
}
